home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 February / february_2000.iso / site building / GoLive 4.0 Tryout / data1.cab / Apps / Modules / JScripts / ActionScripts / Main.scpt < prev    next >
Encoding:
Text File  |  1999-08-05  |  866 b   |  34 lines

  1. CSStopExecution = false;
  2.  
  3. function CSAction(array) { 
  4.     return CSAction2(CSAct, array);
  5. }
  6. function CSAction2(fct, array) { 
  7.     var result;
  8.     for (var i=0;i<array.length;i++) {
  9.         if(CSStopExecution) return false; 
  10.         var actArray = fct[array[i]];
  11.         if(actArray == null) return false; 
  12.         var tempArray = new Array;
  13.         for(var j=1;j<actArray.length;j++) {
  14.             if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
  15.                 if(actArray[j][0] == "VAR") {
  16.                     tempArray[j] = CSStateArray[actArray[j][1]];
  17.                 }
  18.                 else {
  19.                     if(actArray[j][0] == "ACT") {
  20.                         tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
  21.                     }
  22.                 else
  23.                     tempArray[j] = actArray[j];
  24.                 }
  25.             }
  26.             else
  27.                 tempArray[j] = actArray[j];
  28.         }            
  29.         result = actArray[0](tempArray);
  30.     }
  31.     return result;
  32. }
  33. CSAct = new Object;
  34.